function deleteUser() {
    // 获取要删除用户的邮箱
    const deleteEmail = document.getElementById('deleteEmail').value;

    // 从 localStorage 中读取用户列表
    let users = JSON.parse(localStorage.getItem("users"));

    if (users) {
        // 过滤掉要删除的用户
        const newUsers = users.filter(u => u.email !== deleteEmail);

        if (newUsers.length < users.length) {
            // 更新 localStorage 中的用户列表
            localStorage.setItem("users", JSON.stringify(newUsers));
            alert('User deleted successfully!');
        } else {
            alert('User not found.');
        }
    } else {
        alert('No users found.');
    }
}